home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / scott.Z / scott / WWW / NextStep / Implementation / old / HTFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-13  |  1.6 KB  |  78 lines

  1. /*            File Access                HTFile.h
  2. **            ===========
  3. **
  4. **    These are routines for file access used by WWW browsers.
  5. **
  6. */
  7.  
  8. /*    Convert filenames between local and WWW formats
  9. **    -----------------------------------------------
  10. **    Make up a suitable name for saving the node in
  11. **
  12. **    E.g.    $(HOME)/WWW/news/1234@cernvax.cern.ch
  13. **        $(HOME)/WWW/http/crnvmc/FIND/xx.xxx.xx
  14. */
  15. #ifdef __STDC__
  16. extern char * HTLocalName(const char * name);
  17. #else
  18. extern char * HTLocalName();
  19. #endif
  20.  
  21. /*    Make a WWW name from a full local path name
  22. **
  23. */
  24. #ifdef __STDC__
  25. extern char * WWW_nameOfFile(const char * name);
  26. #else
  27. extern char * WWW_nameOfFile();
  28. #endif
  29.  
  30.  
  31. /*    Determine file format from file name
  32. **    ------------------------------------
  33. */
  34.  
  35. #ifdef __STDC__
  36. extern int HTFileFormat(const char * filename);
  37. #else
  38. extern int HTFileFormat();
  39. #endif    
  40.  
  41.  
  42. /*    Determine write access to a file
  43. //    --------------------------------
  44. //
  45. // On exit,
  46. //    return value    YES if file can be accessed and can be written to.
  47. //
  48. //    Isn't there a quicker way?
  49. */
  50.  
  51. #ifdef __STDC__
  52. extern BOOL HTEditable(const char * filename);
  53. #else
  54. extern BOOL HTEditable();
  55. #endif
  56.  
  57.  
  58. /*    Open a file descriptor for a document
  59. **    -------------------------------------
  60. **
  61. ** On entry,
  62. **    addr        must point to the fully qualified hypertext reference.
  63. **
  64. ** On exit,
  65. **    returns        <0    Error has occured.
  66. **            >=0    Value of file descriptor or socket to be used
  67. **                 to read data.
  68. **    *pFormat    Set to the format of the file, if known.
  69. **            (See WWW.h)
  70. **
  71. */
  72. #ifdef __STDC__
  73. extern int HTOpenFile(const char * addr, WWW_Format* format);
  74. #else
  75. extern int HTOpenFile();
  76. #endif
  77.  
  78.